﻿using EFModel;
using IServices;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Y2.Filters;

namespace Y2.Controllers
{
    [LoginFilter]
    public class salary_standardSeController : Controller
    {
        private readonly Isalary_standard he;

        public salary_standardSeController(Isalary_standard he)
        {
            this.he = he;
        }
        public IActionResult salary_standardSe()
        {
            return View();
        }
        public IActionResult salary_standardSeQuery(int? id)
        {
            ViewBag.ssd_id = id;
            return View();
        }
        //薪酬为通过查询
        public async Task<IActionResult> Querse(int currentPage, int pageSize)
        {
            return Content(JsonConvert.SerializeObject(await he.Querse(currentPage, pageSize)));
        }
        //薪酬通过查询
        public async Task<IActionResult> QuerseTo(int currentPage, int pageSize)
        {
            return Content(JsonConvert.SerializeObject(await he.QuerseTo(currentPage, pageSize)));
        }
        //薪酬基本信息查询
        public async Task<string> Ate()
        {
            return await he.Ate();
        }
        //薪酬模糊查询
        public async Task<IActionResult> QuerSeo(salary_standard salary_, int currentPage, int pageSize)
        {
            return Content(JsonConvert.SerializeObject(await he.QuerSeo(salary_, currentPage, pageSize)));
        }
        //薪酬基本复核过模糊查询
        public async Task<IActionResult> QuerSeoTo(salary_standard salary_, int currentPage, int pageSize)
        {
            return Content(JsonConvert.SerializeObject(await he.QuerSeoTo(salary_, currentPage, pageSize)));
        }
    }
}
